import time

s = open('C:\\Users\\infor\\Downloads\\m1_sorted.txt')
A = []
for i in s:
    A.append(int(i))
x = time.time()
for j in range(len(A)):
    for i in range(len(A) - 1):
        if A[i] > A[i + 1]:
            A[i], A[i + 1] = A[i + 1], A[i]
y = time.time()
print("m1_sorted", int(y - x) * 1000, "milliseconds")

c = open('C:\\Users\\infor\\Downloads\\m2_reverse.txt')
B = []
for i in c:
    B.append(int(i))
n = time.time()
for j in range(len(B)):
    for i in range(len(B) - 1):
        if B[i] > B[i + 1]:
            B[i], B[i + 1] = B[i + 1], B[i]
t = time.time()
print("m2_reverse", int(t - n) * 1000, "milliseconds")

z = open('C:\\Users\\infor\\Downloads\\m3_shuffle.txt')
K = []
for i in z:
    K.append(int(i))
m = time.time()
for j in range(len(K)):
    for i in range(len(K) - 1):
        if K[i] > K[i + 1]:
            K[i], K[i + 1] = K[i + 1], K[i]
e = time.time()
print("m3_shuffle", int(e - m) * 1000, "milliseconds")
